<?php
/**
 * Created by PhpStorm.
 * User: yadongw
 * Date: 15-5-26
 * Time: 下午7:46
 */
use UcxApiSdk\Client;
include 'common.php';

$client = new Client();
$client->setAccessToken($_COOKIE['ucx_access_token']);
$documentResource = $client->getDocument();
$doc_id = $_GET['did'];
$imagesData = $documentResource->preview($doc_id);
?>
<?php foreach($imagesData['images'] as $src): ?>
<img src="<?= $src ?>" width="100%" />
<?php endforeach; ?>